import request from '@/utils/request'

// 查询票据管理列表
export function listTicket(query) {
  return request({
    url: '/house_sale/Ticket/list',
    method: 'get',
    params: query
  })
}

// 查询票据管理详细
export function getTicket(ticketid) {
  return request({
    url: '/house_sale/Ticket/' + ticketid,
    method: 'get'
  })
}

// 新增票据管理
export function addTicket(data) {
  return request({
    url: '/house_sale/Ticket',
    method: 'post',
    data: data
  })
}

// 修改票据管理
export function updateTicket(data) {
  return request({
    url: '/house_sale/Ticket',
    method: 'put',
    data: data
  })
}

// 删除票据管理
export function delTicket(ticketid) {
  return request({
    url: '/house_sale/Ticket/' + ticketid,
    method: 'delete'
  })
}

//修改nextno
export function updNextNo(ticketid){
  return request({
    url: '/house_sale/Ticket/NextNo1/'+ticketid,
    method: 'get'
  })
}
